<!--
 * @Author: 瞿旺兴 18774621495@163.com
 * @Date: 2022-05-20 16:04:43
 * @LastEditors: 瞿旺兴 18774621495@163.com
 * @LastEditTime: 2022-06-08 17:39:15
 * @FilePath: \nien-vue3-admin\src\views\finance\receiverManame\reconciliationManagement\Receivable\staticsManage\generalSummary\components\DetailDialog.vue
 * @Description: 提单报表详情
-->
<template>
  <el-dialog v-model="visible" title="详情">
    <custom-container :config="config" />
  </el-dialog>
</template>

<script setup lang="ts">
import { ref, computed, reactive, defineExpose } from 'vue'

const visible = ref<boolean>(false)

const queryParams = reactive({
  pageSize: 10,
  pageNum: 1,
  customerName: undefined,
  serialNo: undefined,
  ywymc: undefined,
  endDate: undefined,
  sszd: undefined,
  zdzt: undefined,
  qd: undefined,
})
const config = computed({
  get() {
    return {
      query: {
        fields: [
          {
            label: '客户单号',
            prop: 'customerName',
          },
        ],
        queryParams,
        formOption: {},
      },
      btns: [],
      table: {
        columns: [
          { label: '客户名称', align: 'center', prop: 'endDate' },
          { label: '客户单号', align: 'center', prop: 'customerCode' },
          { label: '订单号', align: 'center', prop: 'customerName' },
          { label: '主转单号', align: 'center', prop: 'paidAmount' },
          { label: '总件数', align: 'center', prop: 'totalVotes' },
          { label: '总实重', align: 'center', prop: 'totalPiece' },
          { label: '总计费重', align: 'center', prop: 'totalChargeWeight' },
          { label: '总材积重(方)', align: 'center', prop: '' },
          { label: '提单应收', align: 'center', prop: '' },
          { label: 'ups运费($)', align: 'center', prop: 'status' },
          { label: '提单应付', align: 'center', prop: '' },
          { label: '预估利润', align: 'center', prop: '' },
        ],
        event: {
        },
      },
      api: () => Promise.resolve({ code: 200, data: [{}] }),
    }
  },
  set(val) {
    return val
  },
})

const open = () => {
  visible.value = true
}

defineExpose({
  open,
})
</script>